// file:api.js
// 1、导入axios以及拦截器
import service from './request'

// 查询品牌列表
export const brandList = (data) => {
    return service({
        url: 'goods/brand/brandList',
        method: 'post',
        data
    })
};
// 查询规格列表
export const spcList = (data) => {
    return service({
        url: 'goods/specification/specificationList',
        method: 'post',
        data
    })
};

// 添加品牌列表
export const save = (data) => {
    return service({
        url: 'goods/brand/insert',
        method: 'post',
        data
    })
};
// 添加规格列表
export const saveOps = (data) => {
    return service({
        url: 'goods/specification/insert',
        method: 'post',
        data
    })
};

// 修改品牌接口
export const update = (data) => {
    return service({
        url: 'goods/brand/update',
        method: 'post',
        data
    })
};

// 修改品牌接口
export const updateById = (data) => {
    return service({
        url: 'goods/specification/update',
        method: 'post',
        data
    })
};

// 回显品牌接口
export const findById = (id) => {
    return service({
        url: 'goods/brand/findById?id='+id,
        method: 'get',
    })
};
// 回显规格接口
export const findByIds = (id) => {
    return service({
        url: 'goods/specification/findByIds/'+id,
        method: 'get',
    })
};

// 删除品牌接口
export const delById = (id) => {
    return service({
        url: '/goods/specification/delById/'+id,
        method: 'get',
    })
};
// 删除品牌接口
export const removeById = (data) => {
    return service({
        url: '/goods/specification/removeById',
        method: 'post',
        data
    })
};
export const specListAll = () => {
    return service({
        url: '/goods/specification/listAll',
        method: 'post',
    })
};
